{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1.获取数据\n",
    "# 2.数据基本处理\n",
    "# 2.1 确定特征值,目标值\n",
    "# 2.2 缺失值处理\n",
    "# 2.3 数据集划分\n",
    "# 3.特征工程(字典特征抽取)\n",
    "# 4.机器学习(xgboost)\n",
    "# 5.模型评估"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.feature_extraction import DictVectorizer\n",
    "from sklearn.tree import DecisionTreeClassifier, export_graphviz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1.获取数据\n",
    "titan = pd.read_csv(\"http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic.txt\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>row.names</th>\n",
       "      <th>pclass</th>\n",
       "      <th>survived</th>\n",
       "      <th>name</th>\n",
       "      <th>age</th>\n",
       "      <th>embarked</th>\n",
       "      <th>home.dest</th>\n",
       "      <th>room</th>\n",
       "      <th>ticket</th>\n",
       "      <th>boat</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Allen, Miss Elisabeth Walton</td>\n",
       "      <td>29.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>St Louis, MO</td>\n",
       "      <td>B-5</td>\n",
       "      <td>24160 L221</td>\n",
       "      <td>2</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Allison, Miss Helen Loraine</td>\n",
       "      <td>2.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Montreal, PQ / Chesterville, ON</td>\n",
       "      <td>C26</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Allison, Mr Hudson Joshua Creighton</td>\n",
       "      <td>30.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Montreal, PQ / Chesterville, ON</td>\n",
       "      <td>C26</td>\n",
       "      <td>NaN</td>\n",
       "      <td>(135)</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Allison, Mrs Hudson J.C. (Bessie Waldo Daniels)</td>\n",
       "      <td>25.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Montreal, PQ / Chesterville, ON</td>\n",
       "      <td>C26</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Allison, Master Hudson Trevor</td>\n",
       "      <td>0.9167</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Montreal, PQ / Chesterville, ON</td>\n",
       "      <td>C22</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Anderson, Mr Harry</td>\n",
       "      <td>47.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>E-12</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Andrews, Miss Kornelia Theodosia</td>\n",
       "      <td>63.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Hudson, NY</td>\n",
       "      <td>D-7</td>\n",
       "      <td>13502 L77</td>\n",
       "      <td>10</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Andrews, Mr Thomas, jr</td>\n",
       "      <td>39.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Belfast, NI</td>\n",
       "      <td>A-36</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Appleton, Mrs Edward Dale (Charlotte Lamson)</td>\n",
       "      <td>58.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Bayside, Queens, NY</td>\n",
       "      <td>C-101</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Artagaveytia, Mr Ramon</td>\n",
       "      <td>71.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Montevideo, Uruguay</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>(22)</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Astor, Colonel John Jacob</td>\n",
       "      <td>47.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17754 L224 10s 6d</td>\n",
       "      <td>(124)</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Astor, Mrs John Jacob (Madeleine Talmadge Force)</td>\n",
       "      <td>19.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17754 L224 10s 6d</td>\n",
       "      <td>4</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Aubert, Mrs Leontine Pauline</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Paris, France</td>\n",
       "      <td>B-35</td>\n",
       "      <td>17477 L69 6s</td>\n",
       "      <td>9</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Barkworth, Mr Algernon H.</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Hessle, Yorks</td>\n",
       "      <td>A-23</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Baumann, Mr John D.</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Baxter, Mrs James (Helene DeLaudeniere Chaput)</td>\n",
       "      <td>50.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Montreal, PQ</td>\n",
       "      <td>B-58/60</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Baxter, Mr Quigg Edmond</td>\n",
       "      <td>24.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Montreal, PQ</td>\n",
       "      <td>B-58/60</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Beattie, Mr Thomson</td>\n",
       "      <td>36.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Winnipeg, MN</td>\n",
       "      <td>C-6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Beckwith, Mr Richard Leonard</td>\n",
       "      <td>37.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>D-35</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Beckwith, Mrs Richard Leonard (Sallie Monypeny)</td>\n",
       "      <td>47.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>D-35</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Behr, Mr Karl Howell</td>\n",
       "      <td>26.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>New York, NY</td>\n",
       "      <td>C-148</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Birnbaum, Mr Jakob</td>\n",
       "      <td>25.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>San Francisco, CA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>(148)</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Bishop, Mr Dickinson H.</td>\n",
       "      <td>25.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Dowagiac, MI</td>\n",
       "      <td>B-49</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Bishop, Mrs Dickinson H. (Helen Walton)</td>\n",
       "      <td>19.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Dowagiac, MI</td>\n",
       "      <td>B-49</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Bjornstrm-Steffansson, Mr Mauritz Hakan</td>\n",
       "      <td>28.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Stockholm, Sweden / Washington, DC</td>\n",
       "      <td>NaN</td>\n",
       "      <td></td>\n",
       "      <td>D</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Blackwell, Mr Stephen Weart</td>\n",
       "      <td>45.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Trenton, NJ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>(241)</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Blank, Mr Henry</td>\n",
       "      <td>39.0000</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>Glen Ridge, NJ</td>\n",
       "      <td>A-31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Bonnell, Miss Caroline</td>\n",
       "      <td>30.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Youngstown, OH</td>\n",
       "      <td>C-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>1st</td>\n",
       "      <td>1</td>\n",
       "      <td>Bonnell, Miss Elizabeth</td>\n",
       "      <td>58.0000</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>Birkdale, England Cleveland, Ohio</td>\n",
       "      <td>C-103</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>1st</td>\n",
       "      <td>0</td>\n",
       "      <td>Borebank, Mr John James</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>London / Winnipeg, MB</td>\n",
       "      <td>D-21/2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1283</th>\n",
       "      <td>1284</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Vestrom, Miss Hulda Amanda Adolfina</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1284</th>\n",
       "      <td>1285</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Vonk, Mr Jenko</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1285</th>\n",
       "      <td>1286</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Ware, Mr Frederick</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1286</th>\n",
       "      <td>1287</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Warren, Mr Charles William</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1287</th>\n",
       "      <td>1288</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wazli, Mr Yousif</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1288</th>\n",
       "      <td>1289</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Webber, Mr James</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1289</th>\n",
       "      <td>1290</td>\n",
       "      <td>3rd</td>\n",
       "      <td>1</td>\n",
       "      <td>Wennerstrom, Mr August Edvard</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1290</th>\n",
       "      <td>1291</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wenzel, Mr Linhart</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1291</th>\n",
       "      <td>1292</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Widegren, Mr Charles Peter</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1292</th>\n",
       "      <td>1293</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wiklund, Mr Jacob Alfred</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1293</th>\n",
       "      <td>1294</td>\n",
       "      <td>3rd</td>\n",
       "      <td>1</td>\n",
       "      <td>Wilkes, Mrs Ellen</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1294</th>\n",
       "      <td>1295</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Willer, Mr Aaron</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1295</th>\n",
       "      <td>1296</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Willey, Mr Edward</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1296</th>\n",
       "      <td>1297</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Williams, Mr Howard Hugh</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1297</th>\n",
       "      <td>1298</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Williams, Mr Leslie</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1298</th>\n",
       "      <td>1299</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Windelov, Mr Einar</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1299</th>\n",
       "      <td>1300</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wirz, Mr Albert</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1300</th>\n",
       "      <td>1301</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wiseman, Mr Phillippe</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1301</th>\n",
       "      <td>1302</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Wittevrongel, Mr Camiel</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1302</th>\n",
       "      <td>1303</td>\n",
       "      <td>3rd</td>\n",
       "      <td>1</td>\n",
       "      <td>Yalsevac, Mr Ivan</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1303</th>\n",
       "      <td>1304</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Yasbeck, Mr Antoni</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1304</th>\n",
       "      <td>1305</td>\n",
       "      <td>3rd</td>\n",
       "      <td>1</td>\n",
       "      <td>Yasbeck, Mrs Antoni</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1305</th>\n",
       "      <td>1306</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Youssef, Mr Gerios</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1306</th>\n",
       "      <td>1307</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zabour, Miss Hileni</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1307</th>\n",
       "      <td>1308</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zabour, Miss Tamini</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1308</th>\n",
       "      <td>1309</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zakarian, Mr Artun</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1309</th>\n",
       "      <td>1310</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zakarian, Mr Maprieder</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1310</th>\n",
       "      <td>1311</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zenn, Mr Philip</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1311</th>\n",
       "      <td>1312</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zievens, Rene</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1312</th>\n",
       "      <td>1313</td>\n",
       "      <td>3rd</td>\n",
       "      <td>0</td>\n",
       "      <td>Zimmerman, Leo</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1313 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      row.names pclass  survived  \\\n",
       "0             1    1st         1   \n",
       "1             2    1st         0   \n",
       "2             3    1st         0   \n",
       "3             4    1st         0   \n",
       "4             5    1st         1   \n",
       "5             6    1st         1   \n",
       "6             7    1st         1   \n",
       "7             8    1st         0   \n",
       "8             9    1st         1   \n",
       "9            10    1st         0   \n",
       "10           11    1st         0   \n",
       "11           12    1st         1   \n",
       "12           13    1st         1   \n",
       "13           14    1st         1   \n",
       "14           15    1st         0   \n",
       "15           16    1st         1   \n",
       "16           17    1st         0   \n",
       "17           18    1st         0   \n",
       "18           19    1st         1   \n",
       "19           20    1st         1   \n",
       "20           21    1st         1   \n",
       "21           22    1st         0   \n",
       "22           23    1st         1   \n",
       "23           24    1st         1   \n",
       "24           25    1st         1   \n",
       "25           26    1st         0   \n",
       "26           27    1st         1   \n",
       "27           28    1st         1   \n",
       "28           29    1st         1   \n",
       "29           30    1st         0   \n",
       "...         ...    ...       ...   \n",
       "1283       1284    3rd         0   \n",
       "1284       1285    3rd         0   \n",
       "1285       1286    3rd         0   \n",
       "1286       1287    3rd         0   \n",
       "1287       1288    3rd         0   \n",
       "1288       1289    3rd         0   \n",
       "1289       1290    3rd         1   \n",
       "1290       1291    3rd         0   \n",
       "1291       1292    3rd         0   \n",
       "1292       1293    3rd         0   \n",
       "1293       1294    3rd         1   \n",
       "1294       1295    3rd         0   \n",
       "1295       1296    3rd         0   \n",
       "1296       1297    3rd         0   \n",
       "1297       1298    3rd         0   \n",
       "1298       1299    3rd         0   \n",
       "1299       1300    3rd         0   \n",
       "1300       1301    3rd         0   \n",
       "1301       1302    3rd         0   \n",
       "1302       1303    3rd         1   \n",
       "1303       1304    3rd         0   \n",
       "1304       1305    3rd         1   \n",
       "1305       1306    3rd         0   \n",
       "1306       1307    3rd         0   \n",
       "1307       1308    3rd         0   \n",
       "1308       1309    3rd         0   \n",
       "1309       1310    3rd         0   \n",
       "1310       1311    3rd         0   \n",
       "1311       1312    3rd         0   \n",
       "1312       1313    3rd         0   \n",
       "\n",
       "                                                  name      age     embarked  \\\n",
       "0                         Allen, Miss Elisabeth Walton  29.0000  Southampton   \n",
       "1                          Allison, Miss Helen Loraine   2.0000  Southampton   \n",
       "2                  Allison, Mr Hudson Joshua Creighton  30.0000  Southampton   \n",
       "3      Allison, Mrs Hudson J.C. (Bessie Waldo Daniels)  25.0000  Southampton   \n",
       "4                        Allison, Master Hudson Trevor   0.9167  Southampton   \n",
       "5                                   Anderson, Mr Harry  47.0000  Southampton   \n",
       "6                     Andrews, Miss Kornelia Theodosia  63.0000  Southampton   \n",
       "7                               Andrews, Mr Thomas, jr  39.0000  Southampton   \n",
       "8         Appleton, Mrs Edward Dale (Charlotte Lamson)  58.0000  Southampton   \n",
       "9                               Artagaveytia, Mr Ramon  71.0000    Cherbourg   \n",
       "10                           Astor, Colonel John Jacob  47.0000    Cherbourg   \n",
       "11    Astor, Mrs John Jacob (Madeleine Talmadge Force)  19.0000    Cherbourg   \n",
       "12                        Aubert, Mrs Leontine Pauline      NaN    Cherbourg   \n",
       "13                           Barkworth, Mr Algernon H.      NaN  Southampton   \n",
       "14                                 Baumann, Mr John D.      NaN  Southampton   \n",
       "15      Baxter, Mrs James (Helene DeLaudeniere Chaput)  50.0000    Cherbourg   \n",
       "16                             Baxter, Mr Quigg Edmond  24.0000    Cherbourg   \n",
       "17                                 Beattie, Mr Thomson  36.0000    Cherbourg   \n",
       "18                        Beckwith, Mr Richard Leonard  37.0000  Southampton   \n",
       "19     Beckwith, Mrs Richard Leonard (Sallie Monypeny)  47.0000  Southampton   \n",
       "20                                Behr, Mr Karl Howell  26.0000    Cherbourg   \n",
       "21                                  Birnbaum, Mr Jakob  25.0000    Cherbourg   \n",
       "22                             Bishop, Mr Dickinson H.  25.0000    Cherbourg   \n",
       "23             Bishop, Mrs Dickinson H. (Helen Walton)  19.0000    Cherbourg   \n",
       "24             Bjornstrm-Steffansson, Mr Mauritz Hakan  28.0000  Southampton   \n",
       "25                         Blackwell, Mr Stephen Weart  45.0000  Southampton   \n",
       "26                                     Blank, Mr Henry  39.0000    Cherbourg   \n",
       "27                              Bonnell, Miss Caroline  30.0000  Southampton   \n",
       "28                             Bonnell, Miss Elizabeth  58.0000  Southampton   \n",
       "29                             Borebank, Mr John James      NaN  Southampton   \n",
       "...                                                ...      ...          ...   \n",
       "1283               Vestrom, Miss Hulda Amanda Adolfina      NaN          NaN   \n",
       "1284                                    Vonk, Mr Jenko      NaN          NaN   \n",
       "1285                                Ware, Mr Frederick      NaN          NaN   \n",
       "1286                        Warren, Mr Charles William      NaN          NaN   \n",
       "1287                                  Wazli, Mr Yousif      NaN          NaN   \n",
       "1288                                  Webber, Mr James      NaN          NaN   \n",
       "1289                     Wennerstrom, Mr August Edvard      NaN          NaN   \n",
       "1290                                Wenzel, Mr Linhart      NaN          NaN   \n",
       "1291                        Widegren, Mr Charles Peter      NaN          NaN   \n",
       "1292                          Wiklund, Mr Jacob Alfred      NaN          NaN   \n",
       "1293                                 Wilkes, Mrs Ellen      NaN          NaN   \n",
       "1294                                  Willer, Mr Aaron      NaN          NaN   \n",
       "1295                                 Willey, Mr Edward      NaN          NaN   \n",
       "1296                          Williams, Mr Howard Hugh      NaN          NaN   \n",
       "1297                               Williams, Mr Leslie      NaN          NaN   \n",
       "1298                                Windelov, Mr Einar      NaN          NaN   \n",
       "1299                                   Wirz, Mr Albert      NaN          NaN   \n",
       "1300                             Wiseman, Mr Phillippe      NaN          NaN   \n",
       "1301                           Wittevrongel, Mr Camiel      NaN          NaN   \n",
       "1302                                 Yalsevac, Mr Ivan      NaN          NaN   \n",
       "1303                                Yasbeck, Mr Antoni      NaN          NaN   \n",
       "1304                               Yasbeck, Mrs Antoni      NaN          NaN   \n",
       "1305                                Youssef, Mr Gerios      NaN          NaN   \n",
       "1306                               Zabour, Miss Hileni      NaN          NaN   \n",
       "1307                               Zabour, Miss Tamini      NaN          NaN   \n",
       "1308                                Zakarian, Mr Artun      NaN          NaN   \n",
       "1309                            Zakarian, Mr Maprieder      NaN          NaN   \n",
       "1310                                   Zenn, Mr Philip      NaN          NaN   \n",
       "1311                                     Zievens, Rene      NaN          NaN   \n",
       "1312                                    Zimmerman, Leo      NaN          NaN   \n",
       "\n",
       "                               home.dest     room             ticket   boat  \\\n",
       "0                           St Louis, MO      B-5         24160 L221      2   \n",
       "1        Montreal, PQ / Chesterville, ON      C26                NaN    NaN   \n",
       "2        Montreal, PQ / Chesterville, ON      C26                NaN  (135)   \n",
       "3        Montreal, PQ / Chesterville, ON      C26                NaN    NaN   \n",
       "4        Montreal, PQ / Chesterville, ON      C22                NaN     11   \n",
       "5                           New York, NY     E-12                NaN      3   \n",
       "6                             Hudson, NY      D-7          13502 L77     10   \n",
       "7                            Belfast, NI     A-36                NaN    NaN   \n",
       "8                    Bayside, Queens, NY    C-101                NaN      2   \n",
       "9                    Montevideo, Uruguay      NaN                NaN   (22)   \n",
       "10                          New York, NY      NaN  17754 L224 10s 6d  (124)   \n",
       "11                          New York, NY      NaN  17754 L224 10s 6d      4   \n",
       "12                         Paris, France     B-35       17477 L69 6s      9   \n",
       "13                         Hessle, Yorks     A-23                NaN      B   \n",
       "14                          New York, NY      NaN                NaN    NaN   \n",
       "15                          Montreal, PQ  B-58/60                NaN      6   \n",
       "16                          Montreal, PQ  B-58/60                NaN    NaN   \n",
       "17                          Winnipeg, MN      C-6                NaN    NaN   \n",
       "18                          New York, NY     D-35                NaN      5   \n",
       "19                          New York, NY     D-35                NaN      5   \n",
       "20                          New York, NY    C-148                NaN      5   \n",
       "21                     San Francisco, CA      NaN                NaN  (148)   \n",
       "22                          Dowagiac, MI     B-49                NaN      7   \n",
       "23                          Dowagiac, MI     B-49                NaN      7   \n",
       "24    Stockholm, Sweden / Washington, DC      NaN                         D   \n",
       "25                           Trenton, NJ      NaN                NaN  (241)   \n",
       "26                        Glen Ridge, NJ     A-31                NaN      7   \n",
       "27                        Youngstown, OH      C-7                NaN      8   \n",
       "28     Birkdale, England Cleveland, Ohio    C-103                NaN      8   \n",
       "29                 London / Winnipeg, MB   D-21/2                NaN    NaN   \n",
       "...                                  ...      ...                ...    ...   \n",
       "1283                                 NaN      NaN                NaN    NaN   \n",
       "1284                                 NaN      NaN                NaN    NaN   \n",
       "1285                                 NaN      NaN                NaN    NaN   \n",
       "1286                                 NaN      NaN                NaN    NaN   \n",
       "1287                                 NaN      NaN                NaN    NaN   \n",
       "1288                                 NaN      NaN                NaN    NaN   \n",
       "1289                                 NaN      NaN                NaN    NaN   \n",
       "1290                                 NaN      NaN                NaN    NaN   \n",
       "1291                                 NaN      NaN                NaN    NaN   \n",
       "1292                                 NaN      NaN                NaN    NaN   \n",
       "1293                                 NaN      NaN                NaN    NaN   \n",
       "1294                                 NaN      NaN                NaN    NaN   \n",
       "1295                                 NaN      NaN                NaN    NaN   \n",
       "1296                                 NaN      NaN                NaN    NaN   \n",
       "1297                                 NaN      NaN                NaN    NaN   \n",
       "1298                                 NaN      NaN                NaN    NaN   \n",
       "1299                                 NaN      NaN                NaN    NaN   \n",
       "1300                                 NaN      NaN                NaN    NaN   \n",
       "1301                                 NaN      NaN                NaN    NaN   \n",
       "1302                                 NaN      NaN                NaN    NaN   \n",
       "1303                                 NaN      NaN                NaN    NaN   \n",
       "1304                                 NaN      NaN                NaN    NaN   \n",
       "1305                                 NaN      NaN                NaN    NaN   \n",
       "1306                                 NaN      NaN                NaN    NaN   \n",
       "1307                                 NaN      NaN                NaN    NaN   \n",
       "1308                                 NaN      NaN                NaN    NaN   \n",
       "1309                                 NaN      NaN                NaN    NaN   \n",
       "1310                                 NaN      NaN                NaN    NaN   \n",
       "1311                                 NaN      NaN                NaN    NaN   \n",
       "1312                                 NaN      NaN                NaN    NaN   \n",
       "\n",
       "         sex  \n",
       "0     female  \n",
       "1     female  \n",
       "2       male  \n",
       "3     female  \n",
       "4       male  \n",
       "5       male  \n",
       "6     female  \n",
       "7       male  \n",
       "8     female  \n",
       "9       male  \n",
       "10      male  \n",
       "11    female  \n",
       "12    female  \n",
       "13      male  \n",
       "14      male  \n",
       "15    female  \n",
       "16      male  \n",
       "17      male  \n",
       "18      male  \n",
       "19    female  \n",
       "20      male  \n",
       "21      male  \n",
       "22      male  \n",
       "23    female  \n",
       "24      male  \n",
       "25      male  \n",
       "26      male  \n",
       "27    female  \n",
       "28    female  \n",
       "29      male  \n",
       "...      ...  \n",
       "1283  female  \n",
       "1284    male  \n",
       "1285    male  \n",
       "1286    male  \n",
       "1287    male  \n",
       "1288    male  \n",
       "1289    male  \n",
       "1290    male  \n",
       "1291    male  \n",
       "1292    male  \n",
       "1293  female  \n",
       "1294    male  \n",
       "1295    male  \n",
       "1296    male  \n",
       "1297    male  \n",
       "1298    male  \n",
       "1299    male  \n",
       "1300    male  \n",
       "1301    male  \n",
       "1302    male  \n",
       "1303    male  \n",
       "1304  female  \n",
       "1305    male  \n",
       "1306  female  \n",
       "1307  female  \n",
       "1308    male  \n",
       "1309    male  \n",
       "1310    male  \n",
       "1311  female  \n",
       "1312    male  \n",
       "\n",
       "[1313 rows x 11 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titan"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>row.names</th>\n",
       "      <th>survived</th>\n",
       "      <th>age</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1313.000000</td>\n",
       "      <td>1313.000000</td>\n",
       "      <td>633.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>657.000000</td>\n",
       "      <td>0.341965</td>\n",
       "      <td>31.194181</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>379.174762</td>\n",
       "      <td>0.474549</td>\n",
       "      <td>14.747525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.166700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>329.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>21.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>657.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>30.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>985.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>41.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1313.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>71.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         row.names     survived         age\n",
       "count  1313.000000  1313.000000  633.000000\n",
       "mean    657.000000     0.341965   31.194181\n",
       "std     379.174762     0.474549   14.747525\n",
       "min       1.000000     0.000000    0.166700\n",
       "25%     329.000000     0.000000   21.000000\n",
       "50%     657.000000     0.000000   30.000000\n",
       "75%     985.000000     1.000000   41.000000\n",
       "max    1313.000000     1.000000   71.000000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titan.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2.数据基本处理\n",
    "# 2.1 确定特征值,目标值\n",
    "x = titan[[\"pclass\", \"age\", \"sex\"]]\n",
    "y = titan[\"survived\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pclass</th>\n",
       "      <th>age</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1st</td>\n",
       "      <td>29.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1st</td>\n",
       "      <td>2.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1st</td>\n",
       "      <td>30.0000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1st</td>\n",
       "      <td>25.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1st</td>\n",
       "      <td>0.9167</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  pclass      age     sex\n",
       "0    1st  29.0000  female\n",
       "1    1st   2.0000  female\n",
       "2    1st  30.0000    male\n",
       "3    1st  25.0000  female\n",
       "4    1st   0.9167    male"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1\n",
       "1    0\n",
       "2    0\n",
       "3    0\n",
       "4    1\n",
       "Name: survived, dtype: int64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/sherwin/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py:5430: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  self._update_inplace(new_data)\n"
     ]
    }
   ],
   "source": [
    "# 2.2 缺失值处理\n",
    "x['age'].fillna(value=titan[\"age\"].mean(), inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pclass</th>\n",
       "      <th>age</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1st</td>\n",
       "      <td>29.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1st</td>\n",
       "      <td>2.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1st</td>\n",
       "      <td>30.0000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1st</td>\n",
       "      <td>25.0000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1st</td>\n",
       "      <td>0.9167</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  pclass      age     sex\n",
       "0    1st  29.0000  female\n",
       "1    1st   2.0000  female\n",
       "2    1st  30.0000    male\n",
       "3    1st  25.0000  female\n",
       "4    1st   0.9167    male"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2.3 数据集划分\n",
    "x_train, x_test, y_train, y_test = train_test_split(x, y, random_state=22, test_size=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 3.特征工程(字典特征抽取)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pclass</th>\n",
       "      <th>age</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>649</th>\n",
       "      <td>3rd</td>\n",
       "      <td>45.000000</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1078</th>\n",
       "      <td>3rd</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>1st</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>201</th>\n",
       "      <td>1st</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>1st</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     pclass        age     sex\n",
       "649     3rd  45.000000  female\n",
       "1078    3rd  31.194181    male\n",
       "59      1st  31.194181  female\n",
       "201     1st  18.000000    male\n",
       "61      1st  31.194181  female"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train = x_train.to_dict(orient=\"records\")\n",
    "x_test = x_test.to_dict(orient=\"records\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'pclass': '3rd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 6.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 4.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 13.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 62.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 6.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 10.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 53.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 25.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 43.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 59.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 51.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 6.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 4.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 12.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 69.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 2.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 14.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 0.8333, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 53.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 49.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 8.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 6.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 61.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 67.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 11.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 59.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 43.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 51.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 44.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 65.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 37.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 0.8333, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 1.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 2.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 0.9167, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 14.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 60.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 61.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 0.1667, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 15.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 62.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 70.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 51.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 59.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 15.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 8.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 63.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 43.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 1.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 4.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 5.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 11.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 26.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 0.8333, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 60.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 71.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 13.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 4.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 71.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 6.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 65.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 7.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 2.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " ...]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "transfer = DictVectorizer()\n",
    "\n",
    "x_train = transfer.fit_transform(x_train)\n",
    "x_test = transfer.fit_transform(x_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n",
       "              colsample_bynode=1, colsample_bytree=1, gamma=0,\n",
       "              learning_rate=0.1, max_delta_step=0, max_depth=3,\n",
       "              min_child_weight=1, missing=None, n_estimators=100, n_jobs=1,\n",
       "              nthread=None, objective='binary:logistic', random_state=0,\n",
       "              reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,\n",
       "              silent=None, subsample=1, verbosity=1)"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4.xgboost模型训练\n",
    "# 4.1 初步模型训练\n",
    "from xgboost import XGBClassifier\n",
    "\n",
    "xg = XGBClassifier()\n",
    "\n",
    "xg.fit(x_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7832699619771863"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xg.score(x_test, y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.6311787072243346\n",
      "0.7908745247148289\n",
      "0.7870722433460076\n",
      "0.7832699619771863\n",
      "0.7870722433460076\n",
      "0.7908745247148289\n",
      "0.7908745247148289\n",
      "0.7946768060836502\n",
      "0.7908745247148289\n",
      "0.7946768060836502\n"
     ]
    }
   ],
   "source": [
    "# 4.2 对max_depth进行调优\n",
    "\n",
    "depth_range  = range(10)\n",
    "score = []\n",
    "\n",
    "for i in depth_range:\n",
    "    xg = XGBClassifier(eta=1, gamma=0, max_depth=i)\n",
    "    xg.fit(x_train, y_train)\n",
    "    \n",
    "    s = xg.score(x_test, y_test)\n",
    "    \n",
    "    print(s)\n",
    "    score.append(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAD6CAYAAABApefCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAHZRJREFUeJzt3WtsXOed3/Hvn3cOSfGm0cWUSMWWJTtuq01Dp64jeyU5ctNCNrpFUQSJsUa3qAED22CxcIym2Jd90RRuiyw2CCoUbXddL/ZFCqMLZd1EK8tNHdiVKXil7Doc2ZStS6KhR6REDu+X+ffFHN5GQ86QHOpw5vw+gOBnhs8h/xxLvznzPM85j7k7IiJS2arCLkBERLaewl5EJAIU9iIiEaCwFxGJAIW9iEgEKOxFRCJAYS8iEgEKexGRCFDYi4hEQE3YBSzYuXOnHzhwIOwyRETKysWLF2+7e7xQv4Jhb2YNwI+A/cBl4Lc95x4LZtYE/CmwE/i5u79qZjuBN4E24Mfu/q/X+jkHDhygr6+vUDkiIrKMmV0rpl8xwzgvADfd/QjQDpzM0+dbwPvu/lXgMTN7FPg94MfAEeAfmtmhoioXEZGSKybsTwBng/bbwPE8fe4CzWZWDTQCMwvHuXsG+D+rHCciIvdBMWHfCYwE7VGgI0+fN4GvAwPAL919oJjjzOwlM+szs75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fdg31lXztUd384guqBIRWVUxt0vY1h4/0MHjB/LdrkdERBaU/Zm9iIgUprAXEYkAhb2ISAQo7EVEIkBhLyISAQp7EZEIUNiLiESAwl5EJALMfVNbv5aMmaWAaxs8fCf598aNKr0eK+n1WKLXYqVKeD163D1eqNO2CfvNMLM+d+8t3DMa9HqspNdjiV6LlaL0emgYR0QkAhT2IiIRUClhfzrsArYZvR4r6fVYotdipci8HhUxZi8iImurlDN7ERFZQ1mHvZk1mNkZM7tkZq+bWeR3HDezPzaz983sz82s7PcrKAUz+30z+8uw6wibmb0a/N14y8zqwq4nTGbWZGb/y8x+bmb/Pux67oeyDnvgBeCmux8B2oGTIdcTKjM7CtS4+xPADuDZkEsKnZn1AC+GXUfYzOxB4LHg78ZbwL6QSwrbt4D33f2rwGNm9mjYBW21cg/7E8DZoP02cDzEWraDQeD7Qbvc/9+WyveB74ZdxDbwDNBuZj8DngI+DbmesN0Fms2sGmgEZkKuZ8uVeyB0AiNBexSI9P6E7v6xu18ws98CMsBPw64pTGb2TeAS8FHYtWwDcSDl7k+TPas/GnI9YXsT+DowAPzS3QdCrmfLlXvY3wZag3Yr5X/Z86aZ2fPAt4Hn3H0u7HpCdorsGe2fAV82s98NuZ4wjQKJoH0V6Aqxlu3gu8AP3f0A0GFmT4Zcz5Yr97A/x9K49AngfIi1hM7M9gDfAU65ezrsesLm7t9096PAN4CL7v5HYdcUoovAwm0BDpIN/ChrAaaC9jTQHGIt90W5h/0bQJeZXQaGyYZ/lL0I7AV+YmbvmtnvhF2QbA/u/h4wZGYfAAl3vxB2TSH7AfCymb1Hdsy+4rNDF1WJiERAuZ/Zi4hIERT2IiIRoLAXEYkAhb2ISAQo7EVEIkBhLyISAQp7EZEI+P8zvJ30fLNskwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 4.3 调优结果可视化\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.plot(depth_range, score)\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autoclose": false,
   "autocomplete": true,
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
